Skip to content

Better External DB Provider Support#18

Open
sprocktech-dev wants to merge 21 commits intoF3-Nation:mainfrom
f3-tulsa:feature/better-external-db-support
Open

Better External DB Provider Support#18
sprocktech-dev wants to merge 21 commits intoF3-Nation:mainfrom
f3-tulsa:feature/better-external-db-support

Conversation

@sprocktech-dev
Copy link
Copy Markdown
Contributor

Summary

This PR includes some code updates related to previous dependabot PRs. However, most of the PR is related to getting the app to connect to a TiDB external database provider on their free tier. It also includes slight performance tweaks for AWS Lambda cold starts.

Added

  • External DB deploy parameters: ExistingDatabasePort, ExistingDatabaseCreateAppUser, ExistingDatabaseCreateSchema, ExistingDatabaseUsernamePrefix, ExistingDatabaseAppUsername (AWS) / GCP equivalents — support TiDB Cloud and other managed DB providers with cluster-prefixed usernames and 32-char limits

Changed

  • Shortened default DB usernames: sbadmin_{stage} (was syncbot_admin_{stage}), sbapp_{stage} (was syncbot_user_{stage}). Existing RDS instances keep their original master username.
  • Bumped GitHub Actions: actions/checkout v6, actions/setup-python v6, actions/upload-artifact v7, actions/download-artifact v8, aws-actions/configure-aws-credentials v6
  • Dependabot: ignore semver-major updates for the Docker python image (keeps base image on Python 3.12.x line)
  • AWS Lambda: Alembic migrations now run via a post-deploy invoke instead of on every cold start, fixing Slack ack timeouts after deployment; Cloud Run and local dev unchanged
  • AWS Lambda memory increased from 128 MB to 256 MB for faster cold starts
  • EventBridge keep-warm invokes now return a clean JSON response instead of falling through to Slack Bolt
  • AWS bootstrap deploy policy: added lambda:InvokeFunction -- re-run the deploy script (Bootstrap task) or aws cloudformation deploy the bootstrap stack to pick up this permission

Fixed

  • Replaced deprecated datetime.utcnow() with datetime.now(UTC) in backup/migration export helpers

How to test

Use the EXISTING_DATABASE_* env vars to setup a connection to an external database provider.

Checklist

  • CI passes (requirements sync, SAM lint, tests)
  • Docs updated if behavior or deploy steps changed
  • No new cloud-provider-specific code under syncbot/ (keep infra in infra/ and workflows)

sprocktech-dev and others added 21 commits March 27, 2026 13:35
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 6.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](actions/checkout@v4...v6)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Adjusted app DB user creation to better accomodate other DB providers like TiDB.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant